package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.SupShopInfoMapper;
import com.ruoyi.supplier.domain.SupShopInfo;
import com.ruoyi.supplier.service.ISupShopInfoService;

/**
 * 店铺信息Service业务层处理
 * 
 * @author zjf
 * @date 2025-11-05
 */
@Service
public class SupShopInfoServiceImpl implements ISupShopInfoService 
{
    @Autowired
    private SupShopInfoMapper supShopInfoMapper;

    /**
     * 查询店铺信息
     * 
     * @param shopId 店铺信息主键
     * @return 店铺信息
     */
    @Override
    public SupShopInfo selectSupShopInfoByShopId(Long shopId)
    {
        return supShopInfoMapper.selectSupShopInfoByShopId(shopId);
    }

    /**
     * 查询店铺信息列表
     * 
     * @param supShopInfo 店铺信息
     * @return 店铺信息
     */
    @Override
    public List<SupShopInfo> selectSupShopInfoList(SupShopInfo supShopInfo)
    {
        return supShopInfoMapper.selectSupShopInfoList(supShopInfo);
    }

    /**
     * 新增店铺信息
     * 
     * @param supShopInfo 店铺信息
     * @return 结果
     */
    @Override
    public int insertSupShopInfo(SupShopInfo supShopInfo)
    {
        supShopInfo.setCreateTime(DateUtils.getNowDate());
        return supShopInfoMapper.insertSupShopInfo(supShopInfo);
    }

    /**
     * 修改店铺信息
     * 
     * @param supShopInfo 店铺信息
     * @return 结果
     */
    @Override
    public int updateSupShopInfo(SupShopInfo supShopInfo)
    {
        return supShopInfoMapper.updateSupShopInfo(supShopInfo);
    }

    /**
     * 批量删除店铺信息
     * 
     * @param shopIds 需要删除的店铺信息主键
     * @return 结果
     */
    @Override
    public int deleteSupShopInfoByShopIds(Long[] shopIds)
    {
        return supShopInfoMapper.deleteSupShopInfoByShopIds(shopIds);
    }

    /**
     * 删除店铺信息信息
     * 
     * @param shopId 店铺信息主键
     * @return 结果
     */
    @Override
    public int deleteSupShopInfoByShopId(Long shopId)
    {
        return supShopInfoMapper.deleteSupShopInfoByShopId(shopId);
    }
}
